package com.ys.arch.splitamount.algorithm.support;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * <p>@description:</>
 *
 * @author shuang.yang
 * @version 1.0
 * @create 2021/12/25/17:43
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Pair<K, V> {

    private K key;

    private V value;


    public static <K, V> Pair<K, V> of(K key, V value) {
        return new Pair<>(key, value);
    }

    public final K getLeft() {
        return this.getKey();
    }

    public final V getRight() {
        return this.getValue();
    }
}
